#ifndef JSON_ARRAY_H
#define JSON_ARRAY_H
#include "private_implementations/JsonTypes.h"

namespace simframework
{
	namespace json
	{
		class JsonObjectNode;
		class JsonArrayNode : public JsonAbstractNode 
		{
			SimWString			m_valueStr;
			SimWStringIter		m_startIt;
			SimWStringIter		m_endIt;
			unsigned int		m_valueCount;
			JsonAbstractNode *	getValue(JSONType type, unsigned int id, int* status);

		public:
			JsonArrayNode(SimWString str);
			/* This should never return NULL. if status == JSON_SUCCESS, caller should delete them */
			JsonObjectNode *	getObjectValueForId(unsigned int id, int* status = NULL);
			/* This should never return NULL. if status == JSON_SUCCESS, caller should delete them */
			JsonArrayNode *		getArrayValueForId(unsigned int id, int* status = NULL);
			SimWString			getStringValueForId(unsigned int id, int* status = NULL);
			double				getFloatValueForId(unsigned int id, int* status = NULL);
			int					getIntValueForId(unsigned int id, int* status = NULL);
			bool				getBooleanValueForId(unsigned int id, int* status = NULL);
		};
	}
}

#endif